package com.yupi.yupicturebackend.manager.websocket.ws;

import com.yupi.yupicturebackend.manager.websocket.PictureEditHandler;
import com.yupi.yupicturebackend.manager.websocket.model.PictureEditResponseMessage;
import com.yupi.yupicturebackend.service.UserService;
import org.springframework.web.socket.WebSocketSession;

import javax.annotation.Resource;

/**
 @author 边拾柱
 @date 2025/3/28 9:59
 */
public abstract class BaseMessageHandler implements MessageHandler {
    @Resource
    protected UserService userService;

    protected void broadcastToPicture(Long pictureId,
                                      PictureEditResponseMessage response,
                                      WebSocketSession excludeSession,
                                      PictureEditHandler context) throws Exception {
        context.broadcastToPicture(pictureId, response, excludeSession);
    }
}
